package cn.com.yiqi.wsc.service.lottery;

import cn.com.yiqi.wsc.Ro.AwardVO;
import cn.com.yiqi.wsc.common.Result;
import cn.com.yiqi.wsc.dao.lottery.criteria.LotteryActivityCriteria;
import cn.com.yiqi.wsc.entity.lottery.LotteryActivity;
import cn.com.yiqi.wsc.entity.lottery.LotteryActivityDTO;
import cn.com.yiqi.wsc.entity.lottery.LotteryRecord;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @author 何刚
 * @version V1.0
 * @Title: LotteryActivityService
 * @Package cn.com.yiqi.wsc.service.lottery
 * @Description: TODO
 * Copyright: Copyright (c) 2016
 * Company: 成都壹柒互动科技有限公司
 * @date 2017/3/21
 */
public interface LotteryActivityService {

    /**
     * 分页查询
     *
     * @param criteria
     * @return
     */
    Result<PageInfo<LotteryActivity>> pageList(LotteryActivityCriteria criteria);


    /**
     * 添加
     *
     * @param activity
     * @return
     */
    Result<LotteryActivityDTO> insert(LotteryActivityDTO activity, Integer userId);

    /**
     * 添加中奖纪录
     *
     * @param record
     * @param userId
     * @return
     */
    Result<LotteryRecord> insertRecord(LotteryRecord record, Integer userId);


    /**
     * 修改
     *
     * @param activity
     * @return
     */
    Result update(LotteryActivityDTO activity, Integer userId);

    /**
     * 删除
     *
     * @param criteria
     * @return
     */
    Result delete(LotteryActivityCriteria criteria);

    /**
     * 启用
     *
     * @param criteria
     * @return
     */
    Result enable(LotteryActivityCriteria criteria);


    /**
     * 禁用
     *
     * @param criteria
     * @return
     */
    Result disable(LotteryActivityCriteria criteria);

    /**
     * 详情
     *
     * @param criteria
     * @return
     */
    Result<LotteryActivityDTO> detail(LotteryActivityCriteria criteria);


    /**
     * 根据活动查询中奖信息
     *
     * @param criteria
     * @return
     */
    Result<PageInfo<AwardVO>> selectLotteryRecordByActivityId(LotteryActivityCriteria criteria);

    /**
     * 根据当前的时间刷新活动的状态
     * @return
     */
    Result refreshStatusByNowTime();

    Result deleteRecord(Long id);

}
